Skip to content

Conversation

@bendudson
Copy link
Contributor

xbout.wall.AxisymmetricWall represents an axisymmetric wall

xbout.wall.read_geqdsk reads a GEQDSK file, returning an AxisymmetricWall

xbout.cherab.triangulate.TriangularData.wall_flux takes an AxisymmetricWall and calculates heat fluxes to each element.

So to calculate heat fluxes:

wall = xbout.wall.read_geqdsk("geqdsk")

ds = ds.bout.with_cherab_grid()

da = -bd['Rd+_ex'].isel(t=1, zeta=0)

da[:2,:] = 0.0
da[-2:,:] = 0.0

data = da.bout.as_cherab_data()

result = data.wall_flux(cat_wall, pixel_samples=1000)

`xbout.wall.AxisymmetricWall` represents an axisymmetric wall

`xbout.wall.read_geqdsk` reads a GEQDSK file, returning an AxisymmetricWall

`xbout.cherab.triangulate.TriangularData.wall_flux`
takes an AxisymmetricWall and calculates heat fluxes to each element.

So to calculate heat fluxes:

```
wall = xbout.wall.read_geqdsk("geqdsk")

ds = ds.bout.with_cherab_grid()

da = -bd['Rd+_ex'].isel(t=1, zeta=0)

da[:2,:] = 0.0
da[-2:,:] = 0.0

data = da.bout.as_cherab_data()

result = data.wall_flux(cat_wall, pixel_samples=1000)
```
@pep8speaks
Copy link

pep8speaks commented Dec 11, 2024

Hello @bendudson! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 209:89: E501 line too long (106 > 88 characters)

Comment last updated at 2024-12-11 06:37:51 UTC

"""
return np.stack((self.Rs, self.Zs), axis=-1)

def plot(self, linestyle="k-", ax=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I think plotting the wall onto the plasma is analogous to plotting features like coastlines using cartopy onto the earth.

There might be useful inspiration from how cartopy interacts with matplotlib, especially if you want to set up presets for a small number of possible wall shapes (there are only so many tokamaks in the world).

Checks for presence of "rlim" and "zlim" keys.
Subdivides wall segments into smaller pieces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants